﻿<phone:PhoneApplicationPage 
    x:Class="CarBloke.Pages.SettingsPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="{Binding Path=Strings.ApplicationTitle, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="{Binding Path=Strings._options, Source={StaticResource LanguageProvider}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentGrid" Grid.Row="1" Margin="12,0,12,0">
            <StackPanel Margin="0,20,0,0">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width=".5*"/>
                        <ColumnDefinition Width=".5*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding Path=Strings._odometer, Source={StaticResource LanguageProvider}}" Margin="0, 0, 10, 0" Style="{StaticResource PhoneTextTitle2Style}"/>
                    <RadioButton Grid.Row="1" Grid.Column="0" x:Name="milesRadioButton" Content="{Binding Path=Strings._miles, Source={StaticResource LanguageProvider}}" Checked="odometerRadioButton_Checked"/>
                    <RadioButton Grid.Row="1" Grid.Column="1" x:Name="kilometersRadioButton" Content="{Binding Path=Strings._kilometers, Source={StaticResource LanguageProvider}}" Checked="odometerRadioButton_Checked"/>
                </Grid>
                <Grid Margin="0,30,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width=".5*"/>
                        <ColumnDefinition Width=".5*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding Path=Strings._fuel, Source={StaticResource LanguageProvider}}" Margin="0, 0, 10, 0" Style="{StaticResource PhoneTextTitle2Style}"/>
                    <RadioButton Grid.Row="1" Grid.Column="0" x:Name="gallonsUSRadioButton" Content="{Binding Path=Strings._gallonsUS, Source={StaticResource LanguageProvider}}" Checked="fuelRadioButton_Checked"/>
                    <RadioButton Grid.Row="1" Grid.Column="1" x:Name="gallonsUKRadioButton" Content="{Binding Path=Strings._gallonsUK, Source={StaticResource LanguageProvider}}" Checked="fuelRadioButton_Checked"/>
                    <RadioButton Grid.Row="2" Grid.Column="0" x:Name="litersRadioButton" Content="{Binding Path=Strings._liters, Source={StaticResource LanguageProvider}}" Checked="fuelRadioButton_Checked"/>
                </Grid>
                <Grid Margin="0,30,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width=".5*"/>
                        <ColumnDefinition Width=".5*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding Path=Strings._fuelEfficiency, Source={StaticResource LanguageProvider}}" Margin="0, 0, 10, 0" Style="{StaticResource PhoneTextTitle2Style}"/>
                    <RadioButton Grid.Row="1" Grid.Column="0" x:Name="mpgUSRadioButton" Content="{Binding Path=Strings._mpgUS, Source={StaticResource LanguageProvider}}" Checked="efficiencyRadioButton_Checked"/>
                    <RadioButton Grid.Row="1" Grid.Column="1" x:Name="mpgUKRadioButton" Content="{Binding Path=Strings._mpgUK, Source={StaticResource LanguageProvider}}" Checked="efficiencyRadioButton_Checked"/>
                    <RadioButton Grid.Row="2" Grid.Column="0" x:Name="kmlRadioButton" Content="{Binding Path=Strings._kmPerL, Source={StaticResource LanguageProvider}}" Checked="efficiencyRadioButton_Checked"/>
                    <RadioButton Grid.Row="2" Grid.Column="1" x:Name="l100kmRadioButton" Content="{Binding Path=Strings._lPer100Km, Source={StaticResource LanguageProvider}}" Checked="efficiencyRadioButton_Checked"/>
                </Grid>
            </StackPanel>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
